package com.xy.staticproxy;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/15 15:15
 * @description
 */
public class Client {
    public static void main(String[] args) {
        // 生病的老师, 被代理对象
        ITeacherDao patientTeacher = new TeacherDao();

        // 新老师, 代理对象
        //ITeacherDao proxyTeacher = new TeacherDaoProxy(patientTeacher);
        TeacherDaoProxy proxyTeacher = new TeacherDaoProxy();

        // 老师代课
        proxyTeacher.teach();
    }
}
